草庐IT

dart - Flutter中TextField的TextScaleFactor?

全部标签

dart - onTap : only static members can be accessed in initializers error

帮助,当我在GestureDetector小部件或InkWell小部件的onTap属性中调用myMethod时,我得到一个onlystaticmemberscanbeaccessedininitializers错误staticStringseat1Source='images/carSeatBlack.png';_stater(){setState((){if(seat1Source=='images/carSeatBlack.png'){seat1Source='images/carSeatGreen.png';}else{seat1Source='images/carSeatBla

dart - onTap : only static members can be accessed in initializers error

帮助,当我在GestureDetector小部件或InkWell小部件的onTap属性中调用myMethod时,我得到一个onlystaticmemberscanbeaccessedininitializers错误staticStringseat1Source='images/carSeatBlack.png';_stater(){setState((){if(seat1Source=='images/carSeatBlack.png'){seat1Source='images/carSeatGreen.png';}else{seat1Source='images/carSeatBla

flutter - 如何在 flutter 中更新 SilverGrid 或 SilverList 的项目? Flutter 中是否有等同于 notifyDatasetChanged() 的东西?

使用thesamplecodeprovidedbyEmilyFortunainaMediumarticle,"Slivers,Demystified",我使用SilverList和SilverGrid类创建了一个Flutter列表。但是创建列表后我无法更改数据。import'package:flutter/material.dart';import'dart:math'asmath;voidmain()=>runApp(MyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){

flutter - 如何在 flutter 中更新 SilverGrid 或 SilverList 的项目? Flutter 中是否有等同于 notifyDatasetChanged() 的东西?

使用thesamplecodeprovidedbyEmilyFortunainaMediumarticle,"Slivers,Demystified",我使用SilverList和SilverGrid类创建了一个Flutter列表。但是创建列表后我无法更改数据。import'package:flutter/material.dart';import'dart:math'asmath;voidmain()=>runApp(MyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){

ios - pod 安装 : CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" 上的 Flutter 错误

我的Flutter应用程序无法在我的iOS设备上运行,但它在Android设备上运行良好。我在podinstall上遇到错误这是podinstall--verbose的输出alyzingdependenciesInspectingtargetstointegrateUsing`ARCHS`settingtobuildarchitecturesoftarget`Pods-Runner`:(``)Using`ARCHS`settingtobuildarchitecturesoftarget`Pods-OneSignalNotificationServiceExtension`:(``)Fi

ios - pod 安装 : CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" 上的 Flutter 错误

我的Flutter应用程序无法在我的iOS设备上运行,但它在Android设备上运行良好。我在podinstall上遇到错误这是podinstall--verbose的输出alyzingdependenciesInspectingtargetstointegrateUsing`ARCHS`settingtobuildarchitecturesoftarget`Pods-Runner`:(``)Using`ARCHS`settingtobuildarchitecturesoftarget`Pods-OneSignalNotificationServiceExtension`:(``)Fi

firebase - 使用 Flutter 访问 Firestore 中的第 n 个文档

我首先要确定我的集合的长度(即我的集合中有多少文档?)然后随机抓取其中一个文档并显示其中的某些字段。在我的Scaffold中,到目前为止,我有以下StreamBuilder:StreamBuilder(stream:_wordsFoods.snapshots(),builder:(context,snapshot){return_buildList(context,snapshot.data.documents);})_buildList返回集合“words”的长度:Widget_buildList(BuildContextcontext,Listsnapshot){returnCen

firebase - 使用 Flutter 访问 Firestore 中的第 n 个文档

我首先要确定我的集合的长度(即我的集合中有多少文档?)然后随机抓取其中一个文档并显示其中的某些字段。在我的Scaffold中,到目前为止,我有以下StreamBuilder:StreamBuilder(stream:_wordsFoods.snapshots(),builder:(context,snapshot){return_buildList(context,snapshot.data.documents);})_buildList返回集合“words”的长度:Widget_buildList(BuildContextcontext,Listsnapshot){returnCen

ios - Flutter ios shared preference show setstring on null 错误

我有我的flutter应用程序,登录时我调用共享首选项来存储一些值,例如token、用户ID等。所有这一切都在ios和android上运行良好。现在突然在ios上,它给了我NoSuchMethodError:Themethod'setString'wascalledonnull这是代码片段。try{//finaljsonResponse=json.decode(responseJson);Loginlogin1=newLogin.fromJson(responseJson);token=login1.token;print(login1.fleetID);awaitAuthUtils.

ios - Flutter ios shared preference show setstring on null 错误

我有我的flutter应用程序,登录时我调用共享首选项来存储一些值,例如token、用户ID等。所有这一切都在ios和android上运行良好。现在突然在ios上,它给了我NoSuchMethodError:Themethod'setString'wascalledonnull这是代码片段。try{//finaljsonResponse=json.decode(responseJson);Loginlogin1=newLogin.fromJson(responseJson);token=login1.token;print(login1.fleetID);awaitAuthUtils.